<%@ page import="com.baihui.taobao.db.TPSessionDAO" %>
<%@ page import="java.util.Map" %>
<%@ page import="com.baihui.taobao.db.GeneDAO" %>
<%@ page import="com.baihui.taobao.db.DBConnectionMgr" %>
<%@ page import="com.baihui.taobao.AppConstants" %>
<%@ page import="com.baihui.taobao.db.CommonDAO" %>
<%--
  Created by IntelliJ IDEA.
  User: HSZM1106-0312
  Date: 12-1-7
  Time: 上午11:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>

<h1>模拟百会登录界面</h1>

<%
      String nick = request.getParameter("nick");
      if(nick!=null){
          CommonDAO commonDAO = new CommonDAO();
          Map map = commonDAO.findObject("select * from baihuiuser where userid = '"+nick+"' ");
          if(map!=null && map.size()>0){
              request.getSession().setAttribute("USERID",map.get("userid"));
              request.getRequestDispatcher("/init.jsp?USERID="+map.get("userid")+"").forward(request, response);
          }else{
              out.println("<span style='background:red;color:#fff''>没有当前用户"+nick+"</span>");
              out.println("<br/>");
              out.println("<br/>");
          }
      }
%>

<div class="container">
      <form action="login.jsp">
            百会UserID: <input type="text" name="nick"> <br/>
            百会Password:   <input type="password" name="password"> <br/>
            <input type="submit" value="submit">
      </form>
</div>

</body>
</html>